﻿{% extends 'inquire/base.html' %}

{% block title %}
    资产录入区
{% endblock %}

{% block startbody %}
    {#查询后的显示部分#}
    <div class="container">
        <div class="page-header">
            <h1>Sticky footer with fixed navbar</h1>
        </div>
        <p class="lead"></p>
        <p>Back to <a href="#">the default sticky footer</a> minus the navbar.</p>
    </div>

    {#资产的添加#}
    <div class="container">
        <div class="row">
            <form action='#' method='post'>
                {% csrf_token %}
                <div class="form-group col-md-4">
                    <label for="exampleInputEmail1">资产：</label>
                    <select class="form-control" id="exampleInputEmail1" name="asset">
                        {% for id,name in asset_name_list %}
                            <option value='{{ id }}'>{{ name }}</option>
                        {% endfor %}
                    </select>
                </div>

                <div class="form-group col-md-4">
                    <label for="rooms">房间：</label>
                    <select class="form-control" id="rooms" name="room">
                        {% for id,value in room_name_list.items %}
                            <option value='{{ id }}'>{{ value }}</option>
                        {% endfor %}
                    </select>
                </div>

                <div class="form-group col-md-4">
                    <label for="users">保管人：</label>
                    <select class="form-control" id="users" name="user">
                        {% for user in user_name_list %}
                            <option value='{{ user.id }}'>{{ user.name }}</option>
                        {% endfor %}
                    </select>
                </div>

                <div class="form-group col-md-12">
                    <label for="num">数量</label>
                    <input type="number" class="form-control" id="num" placeholder="请输入数量" name='num'>
                </div>

                <div class="form-group col-md-12">
                    <label for="units">单位</label>
                    <input type="text" class="form-control" id="units" placeholder="请输入单位" name='unit'>
                    <br>
                    <button type="submit" class="btn btn-default">Submit</button>
                    <br>
                    <h1>{{ mes }}</h1>
                </div>
            </form>
        </div>
    </div>
    <hr>
    <div class="container">
        <footer>
            <p>&copy; 2016 Company, Inc.</p>
        </footer>
    </div> <!-- /container -->
{% endblock %}
